1. Field of the Invention
This invention is related to processors and, more particularly, to instruction fetch mechanisms in processors.
2. Description of the Related Art
The first step for executing instructions in a processor is to fetch the instructions. Most processors include instruction caches to store instructions for rapid fetching. The latency of instruction cache fetches is generally much shorter than the latency of fetching from memory. For example, cache latencies of one to two clock cycles are fairly common, where memory latencies are often measured in hundreds of clock cycles.
Attention has also recently turned to designing multithreaded processors, in which the instructions being executed by the processor at any given time may belong to two or more independent threads. That is, instructions concurrently being processed in the processor's pipeline may belong to different threads. In multithreaded processors, if the instruction cache is shared between two or more threads, a fetch mechanism must be designed to permit the different threads to fetch from the instruction cache.